Skip to content

Conversation

JerryWu1234
Copy link
Contributor

@JerryWu1234 JerryWu1234 commented Oct 10, 2025

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

Feature: Add System-Sync ("Auto") Theme to Docs

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

- Added dark mode support in global CSS with new color variables.
- Refactored ThemeScript component to improve theme preference handling.
- Updated theme toggle components to accept class props for better styling.
- Simplified theme toggle logic in ThemeToggle component.
- Removed deprecated ThemeScript import from root component.
- Cleaned up unused CSS styles related to theme toggle.
Copy link

changeset-bot bot commented Oct 10, 2025

⚠️ No Changeset found

Latest commit: f68330f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@JerryWu1234 JerryWu1234 self-assigned this Oct 10, 2025
Copy link
Contributor

github-actions bot commented Oct 10, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview f68330f

@maiieul maiieul changed the title Light mode dark mode docs: light mode dark mode Oct 10, 2025
- Added CSS rules for dark mode image filtering and temporary workarounds.
- Updated theme toggle components to remove unused imports and streamline code.
- Introduced light mode styles for ecosystem elements based on user preferences.
- Added dark mode styles for various components including code sandbox and API documentation.
- Removed sun-and-moon theme toggle components and associated CSS to streamline the codebase.
- Updated theme icon styles for better responsiveness and consistency.
@JerryWu1234 JerryWu1234 marked this pull request as ready for review October 13, 2025 05:50
@JerryWu1234 JerryWu1234 requested a review from a team as a code owner October 13, 2025 05:50
gioboa
gioboa previously requested changes Oct 13, 2025
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your help @JerryWu1234
with this change the top right icons are not visible anymore. 🤔

Image

@JerryWu1234
Copy link
Contributor Author

Thanks for your help @JerryWu1234 with this change the top right icons are not visible anymore. 🤔

Image

https://qwik.dev/
please look at the official website

Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, can you fix this issue as well please?

@JerryWu1234
Copy link
Contributor Author

I see, can you fix this issue as well please?

done

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start!

I also noticed that on mobile the icon is not centered. But on mobile it would be better to have the text in addition to the icon.

- Removed dark mode CSS rules from global styles and various components to simplify the codebase.
- Updated theme toggle logic to improve responsiveness and ensure consistent theme application based on user preferences.
- Enhanced theme script to handle theme attributes more robustly.
- Changed the fill attribute in Discord, GitHub, and Twitter logo SVGs from a specific color to 'currentColor' for better adaptability in different themes.
- Cleaned up unnecessary CSS rules in the API styles to enhance maintainability.
- Moved the ThemeScript import to the theme-toggle component for better structure.
- Removed the obsolete theme-script file to clean up the codebase.
- Updated the colorSchemeChangeListener import to reflect the new file structure.
- Updated the theme toggle button styles to improve layout and alignment.
- Added conditional text display for theme preference on smaller screens.
- Adjusted visibility of theme icons based on screen size for a cleaner UI.
@JerryWu1234
Copy link
Contributor Author

@wmertens done

- Created a new load-theme.js file to encapsulate the theme loading logic.
- Updated ThemeScript component to import and utilize the new loadThemeScript for improved code organization and maintainability.
- Eliminated the immediately invoked function expression (IIFE) in load-theme.js to simplify the theme loading logic.
- Improved readability and maintainability of the theme loading process.
Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wmertens wmertens merged commit 2f7dcb6 into QwikDev:main Oct 16, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in Qwik Development Oct 16, 2025
Copy link
Member

@gioboa gioboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants